Predicate Abstraction for Linked Data Structures
نویسندگان
چکیده
We present Alias Refinement Types (Art), a new approach to the verification of correctness properties of linked data structures. While there are many techniques for checking that a heap-manipulating program adheres to its specification, they often require that the programmer annotate the behavior of each procedure, for example, in the form of loop invariants and preand post-conditions. Predicate abstraction would be an attractive abstract domain for performing invariant inference, existing techniques are not able to reason about the heap with enough precision to verify functional properties of data structure manipulating programs. In this paper, we propose a technique that lifts predicate abstraction to the heap by factoring the analysis of data structures into two orthogonal components: (1) Alias Types, which reason about the physical shape of heap structures, and (2) Refinement Types, which use simple predicates from an SMT decidable theory to capture the logical or semantic properties of the structures. We prove Art sound by translating types into separation logic assertions, thus translating typing derivations in Art into separation logic proofs. We evaluate Art by implementing a tool that performs type inference for an imperative language. We use the tool to infer functional correctness properties of the implementations of user-defined data structures, such as singly and doubly linked lists, cyclic lists, heaps and red-black trees. Our experiments demonstrate that Art requires only 21% of the annotation required by other techniques to verify intermediate functions in these benchmarks.
منابع مشابه
Symbolic Shape Analysis Diploma Thesis
Shape analysis deals with the synthesis of invariants for programs manipulating heap-allocated data structures. Explicit shape analysis algorithms do not scale very well. This work proposes a framework for symbolic shape analysis that addresses this problem. Our contribution is a framework that allows to abstract programs with heap-allocated data symbolically by Boolean programs. For this purpo...
متن کاملA Logic and Decision Procedure for Predicate Abstraction of Heap-Manipulating Programs
An important and ubiquitous class of programs are heap-manipulating programs (HMP), which manipulate unbounded linked data structures by following pointers and updating links. Predicate abstraction has proved to be an invaluable technique in the field of software model checking; this technique relies on an efficient decision procedure for the underlying logic. The expression and proof of many i...
متن کاملA Better Logic and Decision Procedure for Predicate Abstraction of Heap-Manipulating Programs
Heap-manipulating programs (HMP), which manipulate unbounded linked data structures via pointers, are a major frontier for software model checking. In recent work, we proposed a small logic and inference-rule-based decision procedure and demonstrated their potential by verifying, via predicate abstraction, some simple HMPs. In this work, we generalize and improve our previous results to be prac...
متن کاملSymbolic shape analysis
The goal of program verification is to ensure software reliability by establishing a mathematical proof which guarantees that the software behaves correctly. Program analysis tools assist the developer in the verification process. Ideally a program analysis should be applicable to a wide range of verification problems without imposing a high burden on its users, i.e., without requiring deep mat...
متن کاملPredicate Abstraction and Canonical Abstraction for Singly-Linked Lists
Predicate abstraction and canonical abstraction are two finitary abstractions used to prove properties of programs. We study the relationship between these two abstractions by considering a very limited case: abstraction of (potentially cyclic) singly-linked lists. We provide a new and rather precise family of abstractions for potentially cyclic singlylinked lists. The main observation behind t...
متن کامل